]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
mount-operation: close the password entry on operation abort
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 19 Jun 2012 20:41:39 +0000 (16:41 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 20 Jun 2012 14:14:07 +0000 (10:14 -0400)
If the device disappears in the middle of a mount operation, make sure
to dismiss the password prompt automatically.

https://bugzilla.gnome.org/show_bug.cgi?id=673787

js/ui/shellMountOperation.js

index f7fbb18902b96b95a69bc0e6bc9dce0fea1d65fb..b91850fa261427a25dd55e2b7e23f10e2e6a1109 100644 (file)
@@ -157,11 +157,19 @@ const ShellMountOperation = new Lang.Class({
     },
 
     _onAborted: function(op) {
-        if (!this._dialog)
+        if (!this._dialog && !this._source)
             return;
 
-        this._dialog.close(global.get_current_time());
-        this._dialog = null;
+        if (this._dialog) {
+            this._dialog.close(global.get_current_time());
+            this._dialog = null;
+        }
+
+        if (this._source) {
+            this._notificationShowing = false;
+            this._source.destroy();
+            this._source = null;
+        }
     },
 
     _onShowProcesses2: function(op) {